import {RequestUtil} from '@/utils'

export class SystemHttp {

    static PREFIX = "manager/member/profile"


// =============
    //    查询 会员资料
    static getMainPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/main/pageList`, params)

    //   新增 会员资料
    static addMain = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/main/add`, data)

    //     修改 会员资料
    static updateMain = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/main/update/${id}`, data)
    //     修改 会员资料

    static updateRemarks = (id: string | number, data: Record<string, any>) => RequestUtil.putAjax(`${this.PREFIX}/main/updateRemarks/${id}`, data)

    //   删除 会员资料
    static delMain = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/main/delete`, data)

    static initialization = (id: string | number) => RequestUtil.getAjax(`${this.PREFIX}/main/initialization/`+id)


    static generatedMember = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/main/generated`, data)


    //   ====== 会员地址===========

    //   删除 会员地址
    static getAddressPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/address/pageList`, params)
    //   删除 会员地址
    static delAddress = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/address/delete`, data)


    static getAccountPage = (params: Record<string, any>) => RequestUtil.getAjax(`${this.PREFIX}/account/pageList`, params)
    //   删除 会员地址
    static delAccount = (data: any[]) => RequestUtil.delAjax(`${this.PREFIX}/account/delete`, data)

    // 查询会员账单
    static getBillList = (data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/account/billList`, data)

    // 调整会员金币
    static changeCoin = (  data: Record<string, any>) => RequestUtil.postAjax(`${this.PREFIX}/account/changeCoin`, data)

}
